<?php
/**
 * Created by PhpStorm.
 * User: chenyu
 * Date: 2017-09-14
 * Time: 11:21
 */

namespace EpgApp\modules\sdks\Image\datastruct\base;

use EpgApp\modules\sdks\Image\datastruct\protocols\GeometryProtocol ;

abstract  class BaseGeometry implements GeometryProtocol
{
    protected $originPoint ;
    protected $x ;
    protected $y ;
    protected $z ;
    protected $t ;
    protected $angle ;
    protected $type ;

    const   FOREVER_TIME = 0.0;

    public function __construct($type='BaseGeometry',$x=0,$y=0,$z=0,$angle=0,$t=self::FOREVER_TIME)
    {
         $this->type = array('name'=>$type,'graphClass'=>$z?'2d':'3d','dimension'=>$t?'!3':'3');
         $this->x    = $x ;
         $this->y    = $y ;
         $this->angle = $angle ;
         $this->t     = $t ;
         $this->originPoint = array(0,0,0);
    }

    abstract public function setX($x);
    abstract public function setY($y);
    abstract public function setZ($z);
    abstract public function getOrigin();
    abstract public function setTime($x);
    abstract public function setAngle($a);

}